package me.rvj.entity;

import javax.websocket.Session;

/**
 * @program: JavaWeb
 * @description: 用户实体类
 * @author: Rv_Jiang
 * @date: 2021/7/2 0:36
 */
public class User {
    private String userName;
    private String password;
    private int uuid;
    private Session session;

    //    Constructor
    public User() {
    }

    public User(String userName, String password) {
        this.userName = userName;
        this.password = password;
    }

    public User(String userName, String password, int uuid) {
        this.userName = userName;
        this.password = password;
        this.uuid = uuid;
    }

    //    Getter && Setter
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getUuid() {
        return uuid;
    }

    public void setUuid(int uuid) {
        this.uuid = uuid;
    }

    public Session getSession() {
        return session;
    }

    public void setSession(Session session) {
        this.session = session;
    }
//    toString

    @Override
    public String toString() {
        return "{\"uuid\":\"" + uuid + "\",\"userName\":\"" + userName + "\",\"password\":\"" + password + "\"}";
    }
}
